Field of the Invention
The present invention relates to an image capturing apparatus, and in particular relates to a technique of handling a RAW image of a still image or a moving image.
Description of the Related Art
Commonly, image capturing apparatuses are equipped with a Bayer array image sensor. Also, an image capturing apparatus performs DeBayer processing (also called demosaic processing) on Bayer array image information (a RAW image) obtained by the image sensor, and converts it into a signal made up of two color differences and a single luminance for a single pixel. Then, the image capturing apparatus performs so-called developing processing such as noise reduction, optical distortion correction, image correction or the like for each signal. Also, the image capturing apparatus uses a compression technique such as JPEG on the luminance signal and the color difference signals on which the developing processing is performed to encode them, and records the result in a recording medium such as a memory card.
Meanwhile, there are image capturing apparatuses that have a function for recording a RAW image without performing DeBayer processing. With a RAW image, there are the advantages that correction and degradation on the original image is suppressed to a minimum and that advanced editing can be performed after capturing, and a RAW image is used preferentially by high level users of image editing.
However, there is a problem in that the data amount becomes large with RAW images. Consequently, the number of pieces of RAW image data that can be stored in a recording medium is small compared to image data for which DeBayer processing/encoding is performed. Therefore, while RAW images are compressed to perform a suppression of their data amount, this introduces image degradation depending on the image capturing conditions. In Japanese Patent Laid-Open No. 2003-179926 (hereinafter referred to as D1), a configuration in which a quantization coefficient is changed in accordance with image capturing conditions in order to suppress image degradation depending on image capturing conditions is recited.
However, in the foregoing D1, if applied to a RAW image for which white balance has not been taken, there is the possibility that the relation between color components depending on the image capturing conditions will become greatly misaligned with the relation between color components in the original RAW image data, and the image quality will degrade.